;; EX-27 - Harmonic tumbling (JMcC)

(let ((f 80)				 ; fundamental frequency
      (p 10)			         ; number of partials per channel
      (trig (XLine.kr '(10 10) 0.1 60))) ; probability decreases over time
  (let loop ((z 0) (i 0))
    (if (> i p)
	z
	(loop (FSinOsc.ar (* f (+ i 1))
			  0
			  (Decay2.kr (Dust.kr trig 0.02) 0.005 (random 1/2))
			  z)
	      (+ i 1)))))
